package com.yunhe.policyfulfillment.policyful.repository;
import com.yunhe.policyfulfillment.policyful.domain.PolicyInfoApproveProcess;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;

/**
 * @description 企业政策申请审批流程表
 * @author hetao
 * @date 2021-08-24
 */
@Repository
public interface PolicyInfoApproveProcessRepository {

    /**
     * 新增
     * @author hetao
     * @date 2021/08/24
     **/
    int createPolicyInfoApproveProcess(PolicyInfoApproveProcess policyInfoApproveProcess);

    /**
     * 新增
     * @author hetao
     * @date 2021/08/24
     **/
    int createPolicyInfoApproveProcessSelective(PolicyInfoApproveProcess policyInfoApproveProcess);

    /**
     * 刪除
     * @author hetao
     * @date 2021/08/24
     **/
    int deletePolicyInfoApproveProcessByPrimaryKey(@Param("id") int id);

    /**
     * 更新
     * @author hetao
     * @date 2021/08/24
     **/
    int updatePolicyInfoApproveProcessByPrimaryKey(PolicyInfoApproveProcess policyInfoApproveProcess);

    /**
     * 更新
     * @author hetao
     * @date 2021/08/24
     **/
    int updatePolicyInfoApproveProcessByPrimaryKeySelective(PolicyInfoApproveProcess policyInfoApproveProcess);

    /**
     * 根据主键查询
     * @author hetao
     * @date 2021/08/24
     **/
    PolicyInfoApproveProcess searchPolicyInfoApproveProcessByPrimaryKey(@Param("id") int id);


    List<PolicyInfoApproveProcess> findAuditProcessByApplyMatterId(@Param("applyMatterId")  int id);

    Long getRewardAmount(@Param("year") int year);

    List<PolicyInfoApproveProcess> searchPolicyInfoApproveProcessByOrgId(@Param("orgId") Integer orgId);

    void updatePolicyInfoApproveStatus(@Param("applyMatterId") Integer id,@Param("currentProcessNode") String currentAuditNode);
}